import request from '@/utils/request'

export function fetchGiftList(listQuery) {
  return request({
    url: '/gift/list',
    method: 'get',
    params: {
      page:listQuery.page,
      limit:listQuery.limit,
      name:listQuery.name,
      attribute:listQuery.attribute
    }
  })
}

export function fetchGiftById(id) {
  return request({
    url: `/gift/${id}`,
    method: 'get',
  })
}

export function createGift(temp) {
  return request({
    url: '/gift/create',
    method: 'post',
    data:temp
  })
}

export function updateGift(temp) {
  return request({
    url: '/gift/update',
    method: 'post',
    data:temp
  })
}
